<?php
/**
 * Created by PhpStorm.
 * User: geek
 * Date: 16/4/13
 * Time: 上午12:40
 */
error_reporting(0);
require_once('../model/PdoMySQL.class.php');
require_once('../model/config.php');
header("Content-Type: text/html;charset=utf-8");
if ($_SERVER["REQUEST_METHOD"] == "POST"){
    check();
}

function modify(){
    $longid=$_POST["longid"];
    if (!isset($_POST["longid"]) || empty($_POST["longid"])) {
        echo "参数错误，信息填写不全";
        return;
    }else{
        $pdo=new PdoMySQL();
        $sql1="select formerid from cage where cageid=".$longid;
        $stmt1=$pdo->prepare($sql1);
        $stmt1->execute();

        while($row1=$stmt1->fetch()){
            $cageid=$row1[1];
        }


        $sql2="select * from mouseapply  where  cageid =? order by id  asc ";
        $stmt2=$pdo->prepare($sql2);
        $stmt2->execute(array($cageid));
        while($row2=$stmt2->fetch()){

        }

        $sql3="select * from mouseapply  where  cageid =? order by id  asc";
        $stmt3=$pdo->prepare($sql3);
        $stmt3->execute(array($cageid));


        $res="++";
        while($row3 = $stmt3->fetch()){

            $res = $res +$row2[3] + "++" + $row2[4] + "++"
                + $row2[5] + "++" + $row2[6] + "++"
                + $row2[7] + "++" + $row2[8]+"++" + $row2[1] + "++";

        }




    }
    echo $res;
}
?>